package com.github.ilioili.justdoit.components.fragment;

import android.view.View;
import android.widget.TextView;

import com.github.ilioili.justdoit.R;
import com.github.ilioili.justdoit.model.dao.ScheduleEventDao;
import com.github.ilioili.justdoit.model.pojo.ScheduleEvent;
import com.taihe.template.base.BaseFragment;
import com.taihe.template.base.injection.Id;
import com.taihe.template.base.injection.Layout;

import java.util.List;

/**
 * Created by hantuo on 16/5/29.
 */
@Layout(R.layout.fragment_accomplement)
public class AccomplementFragment extends BaseFragment{
    @Id(R.id.tv_total)
    private TextView tvTotal;

    private List<ScheduleEvent> list;

    public static AccomplementFragment newInstance() {
        return new AccomplementFragment();
    }

    @Override
    protected void init(View rootView) {
        super.init(rootView);
        list = ScheduleEventDao.getRepeatEvent();
        tvTotal.setText("您总共设定了"+list.size()+"个目标");
    }

}
